package com.kzj.service.impl;

import com.kzj.myJar.common.utils.OSSUtil;
import com.kzj.service.FileTransferService;
import org.springframework.stereotype.Service;

import java.io.InputStream;
import java.util.concurrent.TimeUnit;

@Service
public class FileTransferServiceImpl implements FileTransferService {

    @Override
    public String upload(InputStream inputStream,String key) {
        OSSUtil.upload(inputStream,key);
        return OSSUtil.getTemporaryUrl(key,30, TimeUnit.DAYS);
    }
}
